import { createRouter, createWebHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
import FileViewer from '@/views/FileViewer.vue'; // 确保文件路径正确

const routes: Array<RouteRecordRaw> = [
  {
    path: '/:path(.*)*',
    name: 'FileViewer',
    component: FileViewer,
  },
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;